package com.example.mrzhou.srtfoodapplication;

import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

/**
 * Created by SRTfood on 2017/1/21.
 */

public class CategoryTitleLayout extends LinearLayout {

    //Category标题栏

    public CategoryTitleLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        LayoutInflater.from(context).inflate(R.layout.category_title, this);
        Button ButtonBack = (Button) findViewById(R.id.button_back);
        ButtonBack.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                ((Activity)getContext()).finish();
            }
        });
    }
}
